package com.zjc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zjc.pojo.Student;
import com.zjc.pojo.ViolationRecord;
import com.zjc.mapper.ViolationRecordMapper;
import com.zjc.service.ViolationRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 周佳成
 * @since 2023-09-17
 */
@Service
public class ViolationRecordServiceImpl extends ServiceImpl<ViolationRecordMapper, ViolationRecord> implements ViolationRecordService {

	@Resource
	ViolationRecordMapper violationRecordMapper;
	@Override
	public boolean deletevr(Integer vrId) {
		LambdaQueryWrapper<ViolationRecord> lambdaQueryWrapper = new LambdaQueryWrapper<>();
		lambdaQueryWrapper.eq(ViolationRecord::getVrId,vrId);
		return violationRecordMapper.delete(lambdaQueryWrapper)!=0;
	}
}
